﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace BFOAuction
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                MainProduct.InnerHtml = LoadProductAuction().ToString();
            }
        }

        private StringBuilder LoadProductAuction()
        {
            StringBuilder strProduct = new StringBuilder();
            for (int i = 0; i < 20; i++)
            {
                strProduct.Append("<div class='Product'>");

                strProduct.Append("<div class='product_title'>");
                //strProduct.Append("<a href='#' title='Nghỉ Dưỡng 2N1Đ Tại Tajmasago Castle'>Nghỉ Dưỡng 2N1Đ Tại Tajmasago Castle</a>");
                strProduct.Append("</div>");

                strProduct.Append("<div class='product_image'>");
                //strProduct.Append("<img src='http://images.hotdeals.vn/images/detailed/93/thumb135640812550d9253dd992a.jpg' alt='Iphone 5'/>");
                strProduct.Append("</div>");

                strProduct.Append("<div class='Price'>");
                strProduct.Append("Giá khởi điểm: 0");
                strProduct.Append("</div>");

                strProduct.Append("<div class='LeftTime'>00:" + (i + 1) * 10 + ":00</div>");

                strProduct.Append("<div class='Price'>");
                strProduct.Append("Giá hiện tại: 0");
                strProduct.Append("</div>");

                strProduct.Append("<div class='clsbutton'><input type='button' onclick=doSomething('" + i.ToString() + "') value='Đấu giá' /> </div>");

                strProduct.Append("</div>");
            }

            return strProduct;
        }

    }
}
